function setCookie()
{
  var exdate=new Date();
  exdate.setDate(exdate.getDate() + 365);
  var expires="; expires="+exdate.toUTCString();
  $.cookie(username,$('#username').val());
  $.cookie("data",new Date());
  $.cookie("expires",expires);
}

function getUsername() {
  return $.cookie(name);
}

function getData() {
  return $.cookie(surname);
}